package landyer.tools.jdbcGenerator;

/**
 * User: landy
 * Date: 13-12-13
 * Time: 下午6:31
 */
public class ColumnBean {
    private String name;
    private String adjustName;
    private boolean isPrimaryKey;
    private int dataType;
    private String typeName;

    public int getDataType() {
        return dataType;
    }

    public void setDataType(int dataType) {
        this.dataType = dataType;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public boolean isPrimaryKey() {
        return isPrimaryKey;
    }

    public void setPrimaryKey(boolean primaryKey) {
        isPrimaryKey = primaryKey;
    }

    public ColumnBean() {
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAdjustName() {
        return adjustName;
    }

    public void setAdjustName(String adjustName) {
        this.adjustName = adjustName;
    }

    public String getSetterName() {

        return "set"+RenameField.firstUpper(getAdjustName());
    }
    public String getGetterName() {

        return "get"+RenameField.firstUpper(getAdjustName());
    }

    public String getResultSetGetterName() {
        return "get"+RenameField.getResultSetName(this.typeName);
    }
    public String getResultSetSetterName() {
        return "set"+RenameField.getResultSetName(this.typeName);
    }
}
